-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GF2Square
bloq for squaring over GF($2^m$)
#1441
Conversation
GF2Add
bloq for squaring over GF($2^m$)GF2Square
bloq for squaring over GF($2^m$)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
return QGF(characteristic=2, degree=self.bitsize) | ||
|
||
@cached_property | ||
def squaring_matrix(self) -> np.ndarray: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
bloq = GF2Square(m) | ||
GFM = GF(2**m) | ||
assert_consistent_classical_action(bloq, x=GFM.elements) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional test idea: assert cost is only cliffords
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Part of a larger effort to support galois field arithmetic in qualtran. xref #1419
Currently on top of #1438